package cn.edu.scau.cmi.xianjiehua.composite.consitent;

import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicInteger;

public class ConsitentOrganization implements ConsitentComponent{
	
	private static AtomicInteger newInt = new AtomicInteger(1);
	private int count = newInt.getAndIncrement();
	private ArrayList<ConsitentComponent> list = new ArrayList<ConsitentComponent>();

	@Override
	public String getName() {
		return "consitent organization " + count;
	}

	@Override
	public void add(ConsitentComponent component) {
		list.add(component);
	}

	@Override
	public ArrayList<ConsitentComponent> getAllPerson() {
		return list;
	}

}
